#ifndef COMMON_STORAGE_STORAGE_FACTORY_HPP
#define COMMON_STORAGE_STORAGE_FACTORY_HPP

#include "Storage/CommonStorageConfig.hpp"
#include <map>

namespace Model { class CaseEntity; }

namespace Storage
{

class StorageBase;

// TODO: DOcument
class COMMON_STORAGE_API StorageFactory
{
	typedef const char* CaseEntityTypeName;
	typedef std::map< CaseEntityTypeName, StorageBase*> StorageMap;
public:
	StorageBase* getStorage( Model::CaseEntity& entity) const;
	void registerStorage( const type_info& caseEntityID, StorageBase* pStorage);
	bool hasStorageRegistered( const type_info& caseEntityID) const;
private:
	StorageMap storages_;
};

} // namespace Storage

#endif // COMMON_STORAGE_STORAGE_FACTORY_HPP
